package xyz.xtt.asset.vo;

import java.math.BigDecimal;
import java.util.List;

import org.hibernate.validator.constraints.Range;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import xyz.xtt.asset.client.request.MintDataVo;
import xyz.xtt.asset.validator.EnumValue;

/**
 * 资产创建消息
 * 
 * @author huqibo
 * @date 2025/01/10
 */
public class MintMessage {
	@NotBlank(message = "description不能为空")
	private String description;
	@Schema(description = "扩展信息")
	private String externalUrl;
	@NotBlank(message = "展示图不能为空")
	private String image;
	@NotBlank(message = "资产名称不能为空")
	private String name;
	@Schema(description = "上链字段信息")
	@Valid
	@NotNull(message = "上链属性不能为空")
	@NotEmpty(message = "上链属性不能为空")
	private List<MintDataVo> attributes;
	@NotBlank(message = "作者appUid")
	private String authorId;
	@Schema(description = "合约类型 721/1155")
	@EnumValue(stringValues = { "721", "1155" }, message = "合约类型取值不正确,可先值721/1155")
	private String referProtocol;
	@Schema(description = "资产类型编码")
	private String assetType;
	@Schema(description = "业务方id")
	private String bizId;
	@Schema(description = "链框架id")
	private Integer chainId;
	@Schema(description = "资产数量")
	private Integer amount;
	@Schema(description = "资产价格")
	private BigDecimal price;
	@Schema(description = "付款方式 1 通宝 2通钻 3人民币")
	@Range(min = 0, max = 3, message = "资产计价单位不正确 1 通宝 2通钻 3人民币")
	private Integer unit;
	@Schema(description = "业务类型")
	private String bizType;
	@Schema(description = "出售开始时间")
	private Long sellStartDatetime;
	@Schema(description = "出售结束时间")
	private Long sellEndDatetime;
	@Schema(description = "是否上链")
	private Boolean upChain;
	@Schema(description = "出售结束时间")
	private Long assetId;
	@Schema(description = "链上hash地址")
	private String chainTxHash;
}
